home *** CD-ROM | disk | FTP | other *** search
/ NOVA - For the NeXT Workstation / NOVA - For the NeXT Workstation.iso / Documents / NeXTAnswers / appkit.743 < prev    next >
Text File  |  1992-02-06  |  2KB  |  40 lines

  1. {\rtf0\ansi{\fonttbl\f0\fnil Times-Roman;\f3\fmodern Courier;\f2\fmodern Ohlfs;\f1\fswiss Helvetica;}
  2. \paperw13040
  3. \paperh10800
  4. \margl120
  5. \margr120
  6. {\colortbl\red0\green0\blue0;}
  7. \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\f0\b0\i0\ul0\fs28 Q:  I'm using NXImage to show a PostScript or TIFF file.  When I show it on a color system,  the image doesn't look right—there are large black areas.\
  8. \
  9. A:  Probably your image has transparency in it. The image was rendered into an NXImage and then composited onto the screen using 
  10. \f3\b NX_COPY
  11. \f0\b0 . Since 
  12. \f3\b NX_COPY
  13. \f0\b0  produces an exact copy of the bits from the source,  transparent areas in the NXImage were copied onto the screen. On the monochrome MegaPixel display,  these transparent areas expose to white, to emulate the way a sheet of paper might behave.  NeXT's color devices act more like video devices,  and they expose to black.  \
  14. \
  15. In order to avoid exposing the underlying device's representation of transparent,  you should fill in the background and composite the NXImage using 
  16. \f3\b NX_SOVER
  17. \f0\b0 :\
  18. \
  19.  
  20. \pard\tx1240\tx2480\tx3740\tx4980\tx6240\tx7480\tx8720\tx9980\tx11220\tx12480\f3\fc0 - drawSelf:(NXRect *)rects :(int)rectCount\
  21. \{\
  22.     NXPoint pt = \{0.0, 0.0\};\
  23.     \
  24.     PSsetgray(NX_WHITE);\
  25.     NXRectFill(rects);\
  26.     [anImage composite: NX_SOVER toPoint: &pt];\
  27.     return self;\
  28. \}\
  29.  
  30. \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\f0 \
  31.  
  32. \f2\fs22 \
  33.  
  34. \pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\fs28\fc0 QA743\
  35. \
  36. Valid for 2.0\
  37. Not valid for 1.0\
  38. \
  39.  
  40.